home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
patches
/
ifxp21a.lha
/
IFX21to21a_Patch
/
Install_2.1a
next >
Wrap
Text File
|
1995-10-02
|
9KB
|
316 lines
; ImageFX 2.1a Patch Install Script
;
; Written by Thomas Krehbiel
;
; Copyright © 1995 Nova Design, Inc.
; All Rights Reserved
(
;================================================================
; Procedure Definitions
;================================================================
(procedure RunPatch
; pf_old = old version of file
; pf_new = where to put new version of file
; pf_patch = name of patch file
(
(set pf_error
(run
("spatch \"-o%s\" \"-p%s\" \"%s\""
pf_new
pf_patch
pf_old
)
)
)
)
)
(procedure DoPatch
; pf_name = name of file with path
; wheredir = where old files reside
; patchdir = where patches reside
(
(set pf_user (tackon wheredir pf_name))
(set pf_old (tackon wheredir pf_name))
(set pf_new ("%s.new" (tackon wheredir pf_name)))
(set pf_patch ("%s.pch" (tackon patchdir pf_name)))
(if (exists pf_user)
(
(working "Updating " pf_name)
(if (= 0 (exists (tackon backupdir pf_name)))
(
(run ("copy %s %s clone" pf_user (tackon backupdir pf_name)))
)
)
(RunPatch)
(if pf_error
(
(message "Patch failed on file `" pf_user "'.")
)
; else
(
(delete pf_user)
(rename pf_new pf_user)
)
)
)
)
)
)
;================================================================
; Setup
;================================================================
; script variables...
(set versionname "2.1a") ; version number
(set programname ("ImageFX %s" versionname)) ; name of program
(set diskname1 "ImageFX_Disk1:") ; install disk name
(set diskname2 "ImageFX_Disk2:") ; second install disk name
(set diskname3 "ImageFX_Disk3:") ; third install disk name
(set diskname4 "ImageFX_Disk4:") ; fourth install disk name
(set pdiskname1 "") ; patch install disk name
(set tempdir "T:")
; system information...
(set osver (/ (getversion) 65536)) ; os version
(set cputype (database "cpu")) ; cpu type
;-------------------
; Pick a default directory for the installation...
(set initialdir @default-dest) ; defaults to biggest drive
(if (getassign "ImageFX")
(
(set initialdir (getassign "ImageFX"))
)
; else
(
(if (getassign "ImageFX2")
(
(set initialdir (getassign "ImageFX2"))
; if we found ImageFX2:, assume user wants to keep ImageFX2:
(set assignname "ImageFX2")
)
)
)
)
(set tryagain 1)
(while tryagain
(
(set tryagain 0)
;-------------------
; Ask where to install it...
;(set wheredir initialdir)
(set wheredir
(askdir
(prompt "Select the directory where ImageFX is currently installed. The files in "
"this directory will be updated to version " versionname ". All of your "
"preferences will be preserved.")
(help @askdir-help)
(default initialdir)
)
)
;-------------------
; Make sure it's a valid ImageFX
(set checkvar 0)
(set checkvar (+ checkvar (exists (tackon wheredir "Modules/Sys/Scale"))))
(set checkvar (+ checkvar (exists (tackon wheredir "Hooks/Sys/PaintFX"))))
(set checkvar (+ checkvar (exists (tackon wheredir "Hooks/CineMatte"))))
(if (<> 3 checkvar)
(
(message "This update only works on ImageFX 2.1. `" wheredir "' does not appear to contain a copy of ImageFX 2.1.")
(set tryagain 1)
(set initialdir wheredir)
)
)
)
)
(message "The " programname " update will be installed in the drawer `" wheredir "'. If this is correct, click `Proceed'.")
(set @default-dest wheredir)
;================================================================
; PATCH EXISTING FILES
;================================================================
;-------------------
; Begin by extracting our patch archive into the user's
; chosen ImageFX directory. This will be deleted at the end.
(working "Extracting Update Files...")
(set backupdir (tackon wheredir "Backup_Of_2.1"))
(makedir backupdir)
(makedir (tackon backupdir "Libs"))
(makedir (tackon backupdir "Modules"))
(makedir (tackon backupdir "Modules/Loaders"))
(makedir (tackon backupdir "Modules/Preview"))
(makedir (tackon backupdir "Modules/Scanner"))
(makedir (tackon backupdir "Hooks"))
(makedir (tackon backupdir "Help"))
(makedir (tackon backupdir "Rexx"))
(makedir (tackon backupdir "Rexx/AutoFX"))
(set patchdir (tackon wheredir "Patches"))
(makedir patchdir)
(run
("lhex >CON:0/0//80/lhex/AUTO -a -f \"-w=%s\" x %s"
patchdir
(tackon pdiskname1 "Patches.lha")
)
)
;-------------------
; ImageFX
(set pf_name "ImageFX") (DoPatch)
(set pf_name "Browser") (DoPatch)
;-------------------
; Libs
; this one's kinda special
;(set pf_archive (tackon tempdir "Libs.lha"))
(set pf_name "Libs/thumbnail.library")
(set pf_user "LIBS:thumbnail.library")
(set pf_old "LIBS:thumbnail.library")
(set pf_new "LIBS:thumbnail.library.new")
(set pf_patch (tackon patchdir "Libs/thumbnail.library.pch"))
(if (exists pf_user)
(
; only if it was installed
(working "Updating LIBS:thumbnail.library")
(if (= 0 (exists (tackon backupdir pf_name)))
(
(run ("copy %s %s clone" pf_old (tackon backupdir pf_name)))
)
)
(RunPatch)
(if pf_error
(
(message "Patch failed on file `" pf_user "'.")
)
; else
(
(delete pf_old)
(rename pf_new pf_old)
)
)
)
)
;-------------------
; Modules
(set pf_name "Modules/Preview/CyberWB") (DoPatch)
(set pf_name "Modules/Loaders/PostScript") (DoPatch)
(set pf_name "Modules/Loaders/BMP") (DoPatch)
(set pf_name "Modules/Scanner/Epson") (DoPatch)
;-------------------
; Hooks
(set pf_name "Hooks/AutoFX") (DoPatch)
(set pf_name "Hooks/CMIFX") (DoPatch)
(set pf_name "Hooks/CMIFX.FP") (DoPatch)
(set pf_name "Hooks/Measure") (DoPatch)
(set pf_name "Hooks/IMP") (DoPatch)
;-------------------
; Help
(set pf_name "Help/Arexx_Loaders.guide") (DoPatch)
(set pf_name "Help/Arexx_Savers.guide") (DoPatch)
;================================================================
; INSTALL NEW FILES
;================================================================
; don't need these any more
(delete "RAM:spatch")
(delete "RAM:lhex")
(copyfiles
(prompt "")
(help "")
(source patchdir)
(dest wheredir)
(choices
"Standard.toolbox"
)
)
(copyfiles
(prompt "")
(help "")
(source (tackon patchdir "Rexx"))
(dest (tackon wheredir "Rexx"))
(choices
"CreateNails.ifx"
)
)
(copyfiles
(prompt "")
(help "")
(source (tackon patchdir "Rexx/AutoFX"))
(dest (tackon wheredir "Rexx/AutoFX"))
(choices
"SaveBufferAs_MPEG.ifx"
)
)
(copyfiles
(prompt "")
(help "")
(source (tackon patchdir "Modules/Loaders"))
(dest (tackon wheredir "Modules/Loaders"))
(choices
"FlyerClip"
"PNG"
)
)
(copyfiles
(prompt "")
(help "")
(source (tackon patchdir "Modules/Savers"))
(dest (tackon wheredir "Modules/Savers"))
(choices
; "FlyerClip"
"PNG"
)
)
; delete the patches
(run ("delete %s all quiet" patchdir))
; Installation complete!
)
; Revision History:
;
; 22.06.95 tek Created.
; 25.07.95 tek Updated for latest patches.
; 14.09.95 tek Updated for beta release.
; 19.09.95 tek Added guide file patches. Fixed thumbnail.library patch.
; 26.09.95 tek Fixed thumbnail.library patch again.
; 02.10.95 tek Rexx and toolbox files just copied, not patched.